package xyz.ieden.hello.service.impl;

import org.springframework.stereotype.Service;
import xyz.ieden.commons.entity.Book;
import xyz.ieden.hello.service.IBookService;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * Created by Gavin on 2017.08.05.
 */
@Service
public class BookServiceImpl implements IBookService {
    @Override
    public List<Book> getBookList() {
        return null;
    }

    @Override
    public Book getBookById(Integer id) {
        Book book = new Book();
        book.setId(id);
        book.setName("Spring In Action");
        book.setTitle("装配 Bean");
        book.setTagList(Arrays.asList("Bean", "Setter 注入", "构造器注入", "Bean 的创建与销毁"));
        book.setContent("Bean 的创建管理");
        book.setVipContent("Bean 的销毁");
        book.setCreateDate(new Date());
        return book;
    }
}
